pre Calculate Min Max Record Dates
fun preCalculateMinMaxRecordDates(book: AccountBook, accounts: Set<Account>, maxAsOfDate: Int): DateRange?
Pre-Calculate the minimum and maximum record dates from transaction and account start dates that can be used for a networth calculation. Will return null when there is insufficient data to deduce the range. Typically used to pre-determine date bounds before running a full net worth balance calculation (e.g. for chart scaling, filtering, etc.). You should only call this once, and only when needed at the beginning of your code, as it does have to quickly scan all transactions.
Return
Returns a DateRange containing the ideal min(start)/max(end) dates to use (or null if not enough data found).
Parameters
book
The account book.
accounts
List of accounts to be used to filter transactions.
max As Of Date
The maximum (most recent) as-of date to check against.